Skip to content

Typescript multisig upgrade#2758

Open
theodorebugnet wants to merge 5 commits intotheodore/multisig-upgradefrom
theodore/typescript-multisig-upgrade
Open

Typescript multisig upgrade#2758
theodorebugnet wants to merge 5 commits intotheodore/multisig-upgradefrom
theodore/typescript-multisig-upgrade

Conversation

@theodorebugnet
Copy link
Copy Markdown
Contributor

@theodorebugnet theodorebugnet commented Apr 20, 2026

Description

Updates the Typescript SDK according to the new multisig signing format for the upgrade.

  • UnsignedTransaction is now UnsignedTransactionV0, with its three basic fields. The new UnsignedTransction type is the enum used for serializing for signing, as per the new rust implementation. (See below for some more thoughts on this.)
  • Remove payload from Multisig package, it's now only used to manage and aggregate signatures (similar to the rust Multisig type)
  • web3 now depends on multisig (and the web3 dependency in multisig is removed, which was only used for the integration test, which is moved into the integration-test package)

Some thoughts on the types: V0 and V1 both share the same basic fields that define a user-created transaction, and which are also included in both Transaction variants. It may or may not be worthwhile to define a special UnsignedTransactionPayload type or similar, with the semantics being that the "payload" is what users construct, then an UnsignedTransaction is the actual signed bytes (in the V0 case that's the payload + chain hash, in V1 that's payload + multisig credential + chain hash). Or keep UnsignedTransaction as the old type and introduce SigningPayload.
However, this change should probably be coordinated across both Rust and TS; right now I've kept the TS following my current Rust implementation. If we do rename, the functionality will mostly not change, so I think I'd rather go ahead with this PR and then consider the type ergonomics as a follow-up.

  • I have updated CHANGELOG.md with a new entry if my PR makes any breaking changes or fixes a bug. If my PR removes a feature or changes its behavior, I provide help for users on how to migrate to the new behavior.
  • I have carefully reviewed all my Cargo.toml changes before opening the PRs. (Are all new dependencies necessary? Is any module dependency leaked into the full-node (hint: it shouldn't)?)

Linked Issues

  • Fixes # (issue, if applicable)
  • Related to # (issue)

Testing

Describe how these changes were tested. If you've added new features, have you added unit tests?

Docs

Describe where this code is documented. If it changes a documented interface, have the docs been updated?

Rendered docs are available at https://sovlabs-ci-rustdoc-artifacts.us-east-1.amazonaws.com/<BRANCH_NAME>/index.html

@theodorebugnet theodorebugnet changed the title Initial refactor Typescript multisig upgrade Apr 20, 2026
Comment thread typescript/packages/multisig/src/index.ts Outdated
Comment thread typescript/packages/multisig/src/index.ts Outdated
Comment thread typescript/packages/multisig/src/index.ts Outdated
Comment thread typescript/packages/multisig/src/index.ts Outdated

export type StandardRollupSpec<RuntimeCall> = {
UnsignedTransaction: UnsignedTransaction<RuntimeCall>;
UnsignedTransaction: UnsignedTransactionV0<RuntimeCall>;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be UnsignedTransaction?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope - the standard rollup lets users feed in an UnsignedTransactionV0 and internally wraps it in the V0: { ... } envelope for serialization by overriding the new unsignedTxForSigning() helper.

The type name is not super ergonomic but see my note on typing in the PR description - this works, but I'll see if I can introduce a separation between "the bytes serialized for signing" and "the payload the user assembles" (which are currently both represented by UnsignedTransaction, leading to awkward naming like this). This also affects the Rust side in the same way, so if I write a fix it'd be applied to both the rust and TS types.

Comment thread typescript/packages/web3/src/rollup/standard-rollup.ts Outdated
Comment thread typescript/packages/web3/src/rollup/solana-signable-rollup.ts Outdated
Base automatically changed from theodore/witnesless-hash to theodore/multisig-upgrade April 21, 2026 10:38
@theodorebugnet theodorebugnet force-pushed the theodore/typescript-multisig-upgrade branch from 93ff6ea to b1be85f Compare April 21, 2026 20:51
@theodorebugnet theodorebugnet marked this pull request as ready for review April 23, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants